# 子级目录 查找当前目录下的所有源文件
# 包含所有的.cpp文件
aux_source_directory(. DIR_LIB_SRCS)
# 包含所有.h文件
file(GLOB_RECURSE DIR_LIB_HEADERS **/*.h)
# 生成链接库
add_library (child ${DIR_LIB_SRCS} ${DIR_LIB_HEADERS})

set(OpenCV_DIR "D:/Package_Control/OpenCV/opencv_install/")
find_package(OpenCV REQUIRED)

if(OpenCV_FOUND)
    target_include_directories(child PUBLIC ${OpenCV_INCLUDE_DIRS})
    target_link_libraries(child ${OpenCV_LIBS})
 
endif()
# Set warning flags for GCC and Clang
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
endif()